
const app = getApp();
const regeneratorRuntime = global.regeneratorRuntime = require('../libs/regenerator');
const co = require("../libs/co");
const http = require('../libs/httpRequest');
const appConfig = require('../appConfig');

var GridService = function () {
    var _getGridDatas = function *(modelId,count) {
        var ret = yield http.request({
            url: `${appConfig.api.baseUrl}/data/modelData`,
            data: {modelId: modelId,count: count},
            method: 'POST',
            success: (res) => {
                console.log(res.data);
            },
            fail: (err) => {
                console.log(err);
            }
        });
        return ret;
    }
    return {
        getGridDatas: _getGridDatas
    }
}();

module.exports = GridService;
